package com.nsgf.library.utils;


import java.util.regex.Pattern;

/**
 * 项目名称：组件化产品
 * 类名称：Regular
 * 描述: 所有正则表达式都放在这里
 *
 * @author luwei
 * @version [版本号, 2016-9-30]
 */
public class Regular {
    /**
     * 判断邮箱是否合法的正则
     */
    public final static Pattern REGULAR_EMAIL = Pattern
        .compile("^[A-Za-z0-9]+([-_.][A-Za-z0-9]+)*@([A-Za-z0-9]+[-.])+[A-Za-z0-9]{2,9}$");

    /**
     * 判断账号是否合法的正则
     */
    public static final Pattern REGULAR_ACCOUNT = Pattern.compile("^[\\w_]{3,12}$");
    /**
     * 判断手机号是否合法的正则
     */
    public static final Pattern REGULAR_PHONE_NUMBER = Pattern.compile("^1(3[0-9]|4[57]|5[0-35-9]|8[0-9]|70)\\d{8}$");


}
